// 封装和部门相关的请求
import request from '@/utils/request'

export const getDepartmentList = () => request.get('/company/department')

export const getUserList = () => request.get('/sys/user/simple')

// data: { name, code, introduce, managerId, pid }
export const addDepart = data => request.post('/company/department', data)

// getDepartDetail(2)
export const getDepartDetail = id => request.get(`/company/department/${id}`)

export const updateDepart = form => request.put(`/company/department/${form.id}`, form)

export const delDepart = id => request.delete(`/company/department/${id}`)
